package cn.maxhou.t0006;

public class AccessPersonConstrutors {
    public static void main(String[] args) {
        try{
            //加载Person类
            Class clz=Class.forName("cn.maxhou.t0001to2.Person");
            //调用Person类的无参构造创建Person类实例
            Object obj=clz.newInstance();
            //调用Person实例的toString()方法,属性均为默认值
            System.out.println(obj);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
